﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MainPage.master" CodeFile="Mecze.aspx.cs" Inherits="Mecze" %>
<asp:Content ID="Content1" runat="server" 
    contentplaceholderid="ContentPlaceHolder2">

                <div style="height: 447px" align="center">
                    <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Larger" 
                        Text="Rozegrane mecze. "></asp:Label>
                    <BR/>
                    <BR/>
                    <asp:GridView ID="GridView1" runat="server" 
                        AutoGenerateColumns="False" DataKeyNames="id_meczu" DataSourceID="dbmecze" 
                        GridLines="None" CellPadding="4" ForeColor="#333333">
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#EFF3FB" />
                        <Columns>
                            <asp:HyperLinkField DataTextField="druzyna1" DataNavigateUrlFields="d1" DataNavigateUrlFormatString="~/TeamProfile.aspx?t={0}" 
                                 />
                            <asp:BoundField DataField="wynik1" SortExpression="wynik1" 
                                ApplyFormatInEditMode="True" ReadOnly="True" />
                            <asp:BoundField DataField="wynik2" SortExpression="wynik2" 
                                ApplyFormatInEditMode="True" ReadOnly="True"  />
                            <asp:HyperLinkField DataNavigateUrlFields="d2" 
                                DataNavigateUrlFormatString="~/TeamProfile.aspx?t={0}" 
                                DataTextField="druzyna2" />
                            <asp:ButtonField ButtonType="Button" Text="Dodaj statystyki" />
                        </Columns>
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                    <asp:SqlDataSource ID="dbmecze" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ZALSConnectionString %>" 
                        
                        
                        SelectCommand="SELECT [id_meczu], [wynik1], [wynik2], [druzyna1], [druzyna2], [d1], [d2] FROM [MECZE] WHERE ([id_ligi] = @id_ligi) ORDER BY [data] DESC">
                        <SelectParameters>
                            <asp:QueryStringParameter Name="id_ligi" QueryStringField="id_ligi" 
                                Type="Int32" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </div>

</asp:Content>
